﻿package  
{
	import fl.motion.Motion;
	import flash.display.MovieClip;
	import flash.events.Event;
	import ScreensManager.ProjectScreens.IntroductionScreen;
	import ScreensManager.ProjectScreens.Screens;
	import ScreensManager.ScreenManager;
	
	/**
	 * ...
	 * @author ...
	 */
	public class Main extends MovieClip
	{
		private static var _Instance	:Main;
		
		//private var screenManager:ScreenManager;
		
		
		public function Main() 
		{
			_Instance = this;
			
			
			ScreenManager.setCurrentScreen(Screens.INTRODUCTION_SCREEN);
			
			addEventListener(Event.ENTER_FRAME, update, false, 0, true);
		}
		
		public static function getInstance():Main
		{
			return _Instance;
		}
		
		public function update(e:Event):void
		{
			// chamando o update da tela atual
			ScreenManager.getCurrentScreen().update();
		}
	}
}